<template>
  <div class="block">
    <el-pagination
      :current-page="+data.current"
      :page-sizes="[10, 20, 30, 40]"
      :page-size="data.sizes"
      layout="total, sizes, prev, pager, next, jumper"
      :total="+data.total"
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
    />
  </div>
</template>

<script>
export default {
  props: {
    data: {
      type: Object,
      required: true
    }
  },
  methods: {
    handleSizeChange(val) {
      this.$emit('handleSizeChange', val)
    },
    handleCurrentChange(val) {
      this.$emit('handleCurrentChange', val)
    }
  }
}
</script>

<style lang="scss" scoped>
.block{
  display: flex;
  justify-content: center;
  margin: 18px 0 34px;
}
</style>
